﻿#region Copyright(C) 2018 FI Ltd. All rights reserved.
// ==================================================================================================
// Copyright(C) 2018 FI Ltd. All rights reserved.
//
// SYSTEM NAME	    : FI.Net Application Framework
// COMPONENT ID	    : FI.Core
// COMPONENT DESC   : FI.Net Core Foundation
//
// CREATED DATE/BY  : 18 Aug 2018 / Tian Mi
//
// REVISION HISTORY :	
// DATE/BY			SR#/CS/PM#/OTHERS		DESCRIPTION OF CHANGE
// ==================================================================================================
#endregion

using System;

namespace FI.Core
{
    /// <summary>
    /// This enumeration defines 4 states of stateful data entry.
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames"), Flags]
    public enum EntryState
    {
        /// <summary>
        /// The entry has been created but is not part of any StatefulSet. 
        /// An entry is in this state immediately after it has been created and before it is added to a collection, or if it has been removed from a collection.
        /// </summary>
        Detached = 1,

        /// <summary>
        /// he entry has not changed since AcceptChanges was last called.
        /// </summary>
        Unchanged = 2,

        /// <summary>
        /// The entry has been added to a StatefulSet, and AcceptChanges has not been called.
        /// </summary>
        Added = 4,

        /// <summary>
        /// The entry was deleted using the Delete method of the entry.
        /// </summary>
        Deleted = 8,

        /// <summary>
        /// The entry has been modified and AcceptChanges has not been called.
        /// </summary>
        Modified = 16,
    }
}
